<template >
    <div>
       测试编号：<input type="text" v-model="this.info.testno">  <br>
       输入条件<input type="text" v-model="this.info.inputcontent">  <br>
       输入接口<input type="text" v-model="this.info.inputurl">  <br>
       请求方式
       <!-- <input type="text" v-model="this.info.inputmehtod">  <br> -->
        <select name="requestMethod" id="requestMethod" v-model="info.inputmethod">
            <option value="post">POST</option>
            <option value="put">PUT</option>
            <option value="get">GET</option>
            <option value="delete">DELETE</option>
        </select>

       预期结果<input type="text" v-model="this.info.result_yuce">  <br>
       重要级别<input type="text" v-model="this.info.level">  <br>
       <button @click="submitInfo">提交</button>
        
    </div>


    <table>
        <tr>
            <th>测试编号</th>
            <th>输入条件</th>
            <th>输入路径</th>
            <th>输入方法</th>
            <th>预测结果</th>
            <th>输出结果</th>
            <th>等级</th>
            <th>是否成功</th>
        </tr>
        <tr v-for="i,index in this.infolist" :key="index">
            <td>{{i.testno}}</td>
            <td>{{i.inputcontent}}</td>
            <td>{{i.inputurl}}</td>
            <td>{{i.inputmehtod}}</td>
            <td>{{i.result_yuce}}</td>
            <td>{{i.result_end}}</td>
            <td>{{i.level}}</td>
            <td>{{i.success}}</td>
        </tr>
    </table>
</template>
<script>
import http from "../http";

export default {
    name:"testphone",
    data() {
        return {
            info:{
                testno:"",
                inputcontent:"",
                result_yuce:"",
                level:1,
                inputmethod:'',
                inputurl:'',
            },
            infolist:[]
        }
    },
    methods: {
        submitInfo(){
            http.post("/home/nav/testphone/",this.info).then((result) => {
                 console.log(result.data)
            }).catch((err) => {
               
            });
        }
    },
    mounted() {
         http.get("/home/nav/testphone/").then((result) => {
                 console.log(result.data)
                 this.infolist=result.data.data
            }).catch((err) => {
               
            });
    },
}
</script>
<style >
    
</style>